﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
using System.Windows;

namespace WQDSkin.Forms
{
    [Serializable]
    public class WQDException : Exception
    {
        public WQDException()
        {
        }

        public WQDException(string message)
            : base(message)
        {
        }

        public WQDException(string message, Exception? innerException)
            : base(message, innerException)
        {
        }

        protected WQDException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }

    [Serializable]
    public class MissingRequiredTemplatePartException : WQDException
    {
        public MissingRequiredTemplatePartException(FrameworkElement target, string templatePart)
            : base($"Template part \"{templatePart}\" in template for \"{target.GetType().FullName}\" is missing.")
        {
        }

        protected MissingRequiredTemplatePartException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }
}
